/*
 * @Author: wangke
 * @Date: 2025-03-08 01:53:57
 * @LastEditors: wangke
 * @LastEditTime: 2025-08-01 00:25:30
 * 
 */

#include <Arduino.h>
#include <Rc522.h>
#include <BspOid.h>
#include <Sonix.h>
//#include <App_Vs1053b.h>
#include <SPI.h>
#include <App_Sd.h>
#include <App_98357.h>
#include <App_Screen.h>
#include <App_Wifi.h>
void gpioInit(void)
{
  pinMode(21,OUTPUT );
  digitalWrite(21, LOW);
}

void ledBlink()
{
  digitalWrite(21, HIGH);
  delay(1000);
  digitalWrite(21, LOW);
  delay(1000);
}
void setup() {
  // put your setup code here, to run once:
  //Serial.begin(9600);
  Serial1.begin(115200);
  Serial1.println("serial init ok");
  gpioInit();
  // Serial1.println("gpio init ok");
  // Spi_Init();
  // Serial1.println("spi init ok");
  // MFRC522_Init();
  // Serial1.println("Rc522 init ok");
  
  // if(Func_Oid_Init()==SONIX_APP_OK)
  // {
  //   Serial1.println("Oid Init ok\r\n");
  // }
  App_AudioInit();
  // Serial1.println("sd init ok");
  App_SdInit();
  TFT_SPI_INIT();
  App_WifiInit();

}

void loop() {
  // put your main code here, to run repeatedly:
  ledBlink();
  // if(test_rfidCard()){
  App_PlayAudio();
  //App_Recorder();
  TFT_init();
  //TFT_full(GREEN);
  Logo_display(&picture_tab[0],RED,GREEN);
  while(1)
  {
    
  }
}

